﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="user.ascx.cs" Inherits="UserInfo" %>
<%@ Register Assembly="Poker" Namespace="Jungle.Blog.WebControls" TagPrefix="PWC" %>
<%@ Register Assembly="Poker" Namespace="Jungle.UM.WebControls" TagPrefix="PWC2" %>
<%@ Register Assembly="Poker" Namespace="Jungle.Forum.WebControls" TagPrefix="PWC3" %>
<%@ Register Src="~/Modules/Convertor/Controls/HandList.ascx" TagName="HandList" TagPrefix="PUC" %>
<%@ Register assembly="Infragistics35.WebUI.WebDateChooser.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.WebSchedule" tagprefix="igsch" %>

<script language="javascript">
    function ShowVoteMenu()
    {
        var el = document.getElementById('VoteMenu');
        if(el.style.display == "none") el.style.display = "";
        else
            el.style.display = "none";
    }
</script>
<style>
    .table_ td
    {
        padding: 2px;
    }
</style>
<asp:MultiView ID="UserInfoMenu" Visible="true" runat="server" >
    <asp:View ID="otherInfo" runat="server" >
        <div id="VoteMenu" class="vote_div" style="display: none;">
            <div style="font-size: 150%; height: 20px; padding: 5px; float: left;">
                Выберите оценку и оставте комментарий
            </div>
            <div onclick="ShowVoteMenu();" align="right" style="cursor: pointer; padding: 10px;">
                [X]
            </div>
            <div align="center" style="width: 95%;">
                <asp:DropDownList ID="ddl_Votes" runat="server" />
            </div>
            <div align="center">
                <asp:TextBox ID="tb_VoteComment" TextMode="MultiLine" Rows="10" style="width: 95%;" runat="server" />
            </div>
            <div align="center" style="padding-top: 10px;">
                <asp:Button ID="btn_AddVote" CssClass="btn" OnClick="AddVote" Text="Ok" runat="server" />
            </div>
        </div>
        <asp:Label ID="lb_Title" CssClass="forum_super_title" runat="server" />
        <table class="forum_table">
            <tr>
                <td colspan="2" class="forum_td_header" align="center">Информация о пользователе</td>
            </tr>
            <tr>
                <td align="center" style="width: 200px; border: 1px solid #b7c0c5;"> 
                    <asp:Image ID="img_UserAvatar" Width="100" Height="100" BorderWidth="10" runat="server" />
                    <br />
                    <div id="div_AddVote" runat="server" style="cursor: pointer;" onclick="ShowVoteMenu();">[Проголосовать]</div>
                    <br />
                    <br />
                    <asp:HyperLink ID="hp_SendMessage" runat="server" />
                </td>
                <td style="border: 1px solid #b7c0c5; padding: 10px;">
                    <asp:Label ID="lb_UserRaiting" Text="Рейтинг: " Font-Size="150%" runat="server" /><br />
                    <asp:Label ID="lb_UserPoints" Text="Очков: " Font-Size="150%" runat="server" /><br />
                    <asp:Label ID="lb_CountPosts" Text="Очков: " Font-Size="150%" runat="server" /><br />
                    <br />
                    <asp:Label ID="lb_UserInfo" runat="server" />
                    <div class="forum_td_header">
                    </div>
                    <div style="width: 100%;">
                    <table>
                        <tr>
                            <td>
                                <asp:HyperLink ID="hp_toBlog" runat="server">
                                    <asp:Image ID="Image2" ImageUrl="~/Modules/Blog/img/blog.jpg" ToolTip="К блогу" runat="server" />
                                </asp:HyperLink>                            
                            </td>
                            <td style="padding-left: 5px;">
                                <asp:Label ID="lb_UserContacts" Font-Size="150%" runat="server" />    
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:HyperLink ID="hp_toRss" runat="server">
                                    <asp:Image ID="Image1" ImageUrl="~/Modules/Blog/img/rss.jpg" ToolTip="Rss версия" runat="server" />
                                </asp:HyperLink>                              
                            </td>
                        </tr>
                    </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <PWC2:VotesList ID="VotesList1" runat="server" />
                </td>
            </tr>
        </table>
    </asp:View>    
    <asp:View ID="myInfo" runat="server">
    <table class="forum_table">
        <tr>
            <td colspan="2" class="forum_td_header">Профайл</td>
        </tr>
        <tr>
            <td align="center" style="background-color: #eeeeee; padding: 5px;">
                <asp:Image ID="img_Avatar" Height="100" Width="100" runat="server" /><br/>
                <asp:FileUpload ID="fu_Avatar" runat="server" /><br/>
                <asp:Button ID="btn_AddAvatar" OnClick="AddAvatar" Text="Загрузить" runat="server" />
            </td>
            <td style="padding: 5px;">
                <table class="table_">
                    <tr>
                        <td>Ваше Имя:</td>
                        <td>
                            <asp:TextBox ID="tb_Name" Width="400" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>ICQ&nbsp;</td>
                        <td>
                            <asp:TextBox ID="tb_ICQ" Width="400" runat="server" />
                        </td>
                    </tr>                    
                    <tr>
                        <td>Страна</td>
                        <td>
                            <asp:DropDownList ID="ddl_country" runat="server" >
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>Город</td>
                        <td>
                            <asp:TextBox ID="tb_City" Width="400" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>Ваш день рожденья</td>
                        <td>
                            <igsch:WebDateChooser ID="WebDateChooser1" runat="server" Value="2009-02-12" 
                                Height="22px" Width="135px">
                            </igsch:WebDateChooser>                      
                        </td>
                    </tr>
                    <tr>
                        <td>Количество уведомлений о новых сообщениях в день</td>
                        <td>
                            <asp:TextBox ID="tb_CountAlerts" Width="100" runat="server" />
                        </td>
                    </tr>                    
                    <tr>
                        <td>Подпись на форуме</td>
                        <td>
                            <asp:TextBox ID="tb_UserSignature" Width="400" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>Старый пароль</td>
                        <td>
                            <asp:TextBox ID="tb_OldPass" TextMode="Password" Width="400" runat="server" />
                        </td>
                    </tr>     
                    <tr>
                        <td>Новый пароль</td>
                        <td>
                            <asp:TextBox ID="tb_NewPass" TextMode="Password" Width="400" runat="server" />
                        </td>
                    </tr>                                       
                    <tr>
                        <td>Почетных очков(Points)</td>
                        <td>
                            <asp:Label ID="lb_Points" runat="server" /><asp:Image ID="img_Point" align="absmiddle" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>Рейтинг</td>
                        <td>
                            <asp:Label ID="lb_Raiting" runat="server" />
                        </td>
                    </tr>                    
                    <tr>
                        <td></td>
                        <td>
                            <asp:Button ID="btn_Update" OnClick="Update" Text="Обновить" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td align="right">
                            <PWC3:MStatus ID="ms1" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </asp:View>   
  </asp:MultiView>
  <PUC:HandList id="HandList1" runat="server" Visible="false" />